bignum1 = []
bignum2 = []
bigans = []
def kbi():
    a = input()
    b = input()
    for i in range(0,len(a)):
        bignum1.append(int(a[i]))
    for i in range(0,len(b)):
        bignum2.append(int(b[i]))

def bigger():
    if len(bignum1) > len(bignum2):
        return bignum1,bignum2
    elif len(bignum1) < len(bignum2):
        return bignum2,bignum1
    else:
        for i in range(0,len(bignum1)):
            if bignum1[i] > bignum2[i]:
                return bignum1,bignum2
            elif bignum1[i] < bignum2[i]:
                return bignum2,bignum1
    return bignum1,bignum2

def rev():
    bignum1.reverse()
    bignum2.reverse()

def lennormolize(a,b):
    if len(a) > len(b):
        c = len(a) - len(b)
        for i in range(0,c):
            b.append(0)
    elif len(b) > len(a):
        c = len(b) - len(a)
        for i in range(0,c):
            a.append(0)
            
def minus():
    global bignum1,bignum2,bigans
    bignum = []
    smallnum = []
    bignum,smallnum = bigger()
    rev()
    lennormolize(bignum,smallnum)
    for i in range(0, len(bignum)):
        if bignum[i] >= smallnum[i]:
            c = bignum[i] - smallnum[i]
        else:
            c = bignum[i] + 10 - smallnum[i]
            bignum[i + 1] -= 1
        bigans.append(c)
        
def output():
    global bigans
    bigans.reverse()
    for i in range(1,len(bigans)):
        print(bigans[i],end = '')
    print('\n')

def main():
    kbi()
    minus()
    output()

main()